﻿namespace Wedn.Model.Data
{
    /// <summary>
    /// 关系表实体模型类(初步审核通过)
    /// </summary>
    public class Relation
    {
        #region 所有字段
        private int id;
        private int objectId;
        private string objectType;
        private int termId;
        #endregion

        #region 对外公共属性
        /// <summary>
        /// 关系表主键字段
        /// </summary>
        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        /// <summary>
        /// 对象ID字段
        /// </summary>
        public int ObjectId
        {
            get { return objectId; }
            set { objectId = value; }
        }
        /// <summary>
        /// 对象类型
        /// </summary>
        public string ObjectType
        {
            get { return objectType; }
            set { objectType = value; }
        }
        /// <summary>
        /// 分类或标签字段
        /// </summary>
        public int TermId
        {
            get { return termId; }
            set { termId = value; }
        }
        #endregion

        #region 构造函数
        public Relation() { }
        /// <summary>
        /// 关系表实体模型类构造函数
        /// </summary>
        /// <param name="id">关系ID</param>
        /// <param name="objectId">对象ID</param>
        /// <param name="termId">标签或分类ID</param>
        public Relation(int id, int objectId, string objectType, int termId)
        {
            this.id = id;
            this.objectId = objectId;
            this.objectType = objectType;
            this.termId = termId;
        } 
        #endregion
    }
}
